Recording medium having spare area for defect management and information on defect management, and method of allocating spare area and method of managing defects

ABSTRACT

A recording medium having a spare area for defect management and the management information of the spare area, a spare area allocation method, and a defect management method. When a primary spare area is allocated for slipping replacement and linear replacement upon initialization, and a remaining portion of the primary spare area after slipping replacement and allocated for linear replacement after initialization are insufficient, a supplementary spare area is allocated.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.10/699,697, filed Nov. 4, 2003, currently pending, which is acontinuation of U.S. patent application Ser. No. 09/986,284, now U.S.Pat. No. 6,708,300, which is a divisional of U.S. patent applicationSer. No. 09/437,451, now U.S. Pat. No. 6,367,038, and claims the benefitof Korean Application No. 98-48008, filed Nov. 10, 1998 and KoreanApplication No. 99-4678, filed Feb. 10, 1999, in the Korean PatentOffice, the disclosures of which are incorporated herein by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to the field of optical recording media,and more particularly, to a disc having information on the sizes ofallocated spare areas and the remaining amounts thereof, in which anappropriate amount of a primary spare area is allocated uponinitialization, and a supplementary spare area is allocated if theprimary spare area is insufficient while being used after completion ofinitialization, a method of allocating the spare areas, and a method ofmanaging the defects of the primary and supplementary spare areas.

2. Description of the Related Art

In recording media such as general discs, a spare area is allocated onceupon initialization and no supplementary spare area is allocated duringuse of the disc. However, in order to increase the efficiency of using adisc, an appropriate amount of spare area is allocated according to thestate of the disc upon initialization, and a supplementary spare area isallocated when the spare area allocated upon initialization isinsufficient while the disc is being used.

According to a digital versatile disc random access memory (DVD-RAM)standard (DVD Specifications for Rewritable Disc, Part 1 PHYSICALSPECIFICATIONS) version 1.0, each zone has one spare area, so that 24spare areas are allocated upon initialization since a disc has 24 zones.

allocated to each zone within a defect management area (DMA) isconstituted of only one bit, which represents whether or not acorresponding spare area can be used, i.e., whether it is occupied.Accordingly, a full spare area flag has 24 bits of informationrepresenting whether or not 24 spare areas are occupied. Also, this fullspare area flag is stored in relative byte positions (RBP) 8 to 15 of asecondary defect list (SDL) of the DMA. When a bit representing acorresponding group is “1”, this represents that no spare area remainswithin the corresponding group, and when the bit is “0”, this representsthat a spare area remains within the corresponding group.

Information on a spare area, which is constituted of only one bit asdescribed above, represents only whether the spare area is occupied. Onthe other hand, in discs in which a supplementary spare area can beallocated after initialization, it is preferable that the supplementaryspare area is allocated on a disc when the spare area has some room in astate of being almost occupied rather than when the spare area iscompletely occupied. However, a problem occurs in that the state inwhich the spare area is almost occupied cannot be represented by onlythe one bit.

Also, in the allocation of spare areas according to the existing DVD-RAMstandard version 1.0, a predetermined amount of spare area is allocatedto each zone upon initialization, the size of which is predetermined tobe sufficient to process all defects that can be managed by a defectmanagement method that is applied to a corresponding disc.

Here, in order to manage defects on a general recordable/rewritabledisc, a slipping replacement method of skipping defects withoutproviding logical sector numbers to the defects, is not used for defectsgenerated upon initialization of the disc, which are called “primarydefects” It is prescribed in the existing DVD-RAM standard version 1.0that the position of a defective sector replaced by slipping replacementmust be recorded in a primary defect list (PDL) in a DMA on a disc.Also, linear replacement for replacing error correction code (ECC)blocks of an erroneous zone with normal blocks in a spare area, is usedfor defects generated during use of the disc, which are called“secondary defects.” It is prescribed in the existing DVD-RAM standardversion 1.0 that the position of a defective block replaced by linearreplacement must be recorded in an SDL in a DMA on a disc.

However, when an appropriate amount of spare area is allocated accordingto the state of a disc upon initialization, and a supplementary sparearea is allocated as the state of the disc becomes bad during use of thedisc (“bad” meaning that the more the disc is used, the more defects ithas), a more effective spare area allocating method is required. It isprescribed in the existing standard that in a recording and/orreproducing apparatus of a disc, the size of a buffer for temporarilystoring defect management information existing on a disc is 32 Kbytes.Accordingly, a restriction is generated in that the actual number ofdefects that can be managed becomes less than the number of defects thatcan be recorded in the DMA on the disc.

Here, the defect management information includes PDL and SDL, and thesum of the sizes of the PDL and SDL is about 60 Kbytes. Thus, in theDVD-RAM standard version 1.0, PDL ranges from sectors 1 to 15, and theremaining sectors are set to be used to process SDL entries, so that thenumber of PDL entries and SDL entries that can be processed isrestricted in accordance with the size (32 Kbytes) of a buffer of arecording and/or reproducing apparatus.

SUMMARY OF THE INVENTION

To solve the above problems, an object of the present invention is toprovide a recording medium having information associated with the sizeand the remaining amount of a spare area allocated upon initialization,and with the size and the remaining amount of a spare area allocatedafter initialization.

Another object of the present invention is to provide a method of simplycalculating and allocating a spare area for slipping replacement and aspare area for linearly replacing some defects, while a disc is beinginitialized, and a spare area for linear replacement which is requiredduring use of the disc.

Still another object of the present invention is to provide a method ofmanaging defects in a supplementary spare area which is allocated forlinear replacement while the disc is being used.

Additional objects and advantages of the invention will be set forth inpart in the description which follows and, in part, will be obvious fromthe description, or may be learned by practice of the invention.

To achieve the first and other objects, the present invention provides arecording medium such that a primary spare area is allocated uponinitialization and a supplementary spare area is allocated afterinitialization, and the sizes of the spare areas are determined by thenumber of defects generated upon initialization.

To achieve the second and other objects, the present invention providesa method of allocating a total spare area to manage defects in a discrecording and/or reproducing apparatus, the method including determiningthe minimum size of the total spare area using the number of primarydefects generated during initialization; determining the maximum size ofthe total spare area that must be allocated according to the size of amemory device for defect management of the disc recording and/orreproducing apparatus; and allocating a primary spare area for slippingreplacement and linear replacement using the minimum and maximum sizesof the total spare area.

To achieve the third and other objects, the present invention provides adefect management method for a disc recording and/or reproducingapparatus having a primary spare area allocated to replace primarydefects generated during initialization using slipping replacement, anda supplementary spare area allocated to replace secondary defectsgenerated after initialization using linear replacement, the methodcomprising allocating the supplementary spare area using an area thathas already been linearly replaced, wherein defective blocks within thesupplementary spare area which has already been linearly replaced arenot used for linear replacement, and SDL entries within a defectmanagement area with respect to the defective blocks are not changed.

BRIEF DESCRIPTION OF THE DRAWINGS

The above and other objects and advantages of the present invention willbecome more apparent by describing in detail preferred embodimentsthereof with reference to the attached drawings, in which:

FIG. 1 is a view illustrating the structure of a conventional full sparearea flag having SDL contents;

FIG. 2 is a view illustrating the structure of a disc having a userarea, a primary spare area and a supplementary spare area, according tothe present invention;

FIGS. 3A and 3B are views illustrating methods of managing a defectgenerated on a supplementary spare area in the structure of the discshown in FIG. 2;

FIGS. 4A and 4B are tables showing allocation of a primary spare areaand a supplementary spare area according to the present invention, whenthe size of a buffer for defect management in a disc recording and/orreproducing apparatus is 32 Kbytes and 64 Kbytes, respectively;

FIGS. 5A and 5B are views illustrating the structures of a flag ofremainder state information which represents the degree to which a sparearea for managing defects has been used, according to the presentinvention;

FIG. 6 is a flowchart illustrating a method of allocating primary andsupplementary spare areas upon initialization, according to the presentinvention;

FIG. 7 is a flowchart illustrating a method of allocating a (an initial)supplementary spare area using remainder state information of a primaryspare area, according to the present invention; and

FIG. 8 is a flowchart illustrating a method of allocating an anothersupplementary spare area using remainder state information of an initialsupplementary spare area, according to the present invention.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

Spare areas on a disc for defect management according to the presentinvention include a primary spare area and one or more supplementaryspare areas.

The primary spare area is first allocated for defect replacement when adisc is initialized, and is first used for slipping replacement. Theprimary spare area remaining after slipping replacement can also be usedfor linear replacement. The supplementary spare area, for linearlyreplacing defects generated while the disc is being used, denotes aspare area which is additionally allocated while a disc is being usedafter it has been initialized.

That is, in the present invention as shown in FIG. 2, a primary sparearea for slipping replacement and linear replacement is allocated on adisc during initialization of the disc. The slipping replacementperforms replacement in units of sectors, thus increasing the efficiencyof utilization of the spare area. However, in the slipping replacement,defective areas are merely not used, and data starts being recorded inthe next normal data sector, so that the defective areas cannot be usedafter initialization.

The primary spare area must have a minimum spare area necessary forslipping replacement and a predetermined amount of spare area forlinearly replacing defects that can be generated on a disc while thedisc is being used. Here, the portion of the primary spare area forslipping replacement requires at least as many sectors as the number ofentries registered in a PDL among defect management information.

Supplementary spare areas of predetermined sizes are allocated in aforward direction from the rearmost portion of a same logical file areawhen the primary spare area is insufficient to process secondary defectsgenerated during use of the disc after initialization.

In the present invention, a direct pointing rule is also applied as adefect management method for spare areas proposed by the DVD-RAMstandard version 1.0. That is, all defects must be processed by only onereplacement.

An extensible supplementary spare area allocated for linear replacementafter initialization could have been already used as a user data area.That is, a defective block, which is used as a user data area, isallocated as a supplementary spare area, and it could be linearlyreplaced by a primary spare area or a supplementary spare area which hasalready been allocated, as shown in FIG. 3A. When a spare area which hasalready been linearly replaced is intended to be used as a supplementaryspare area, dual replacement of a defect in another user area by adefective block already linearly replaced within the supplementary sparearea violates the direct pointing rule. Also, in read-only discs, theprocess of replacement is complicated.

To solve these problems, as shown in FIG. 3B, a defective block withinthe supplementary spare area that has already been linearly replaced bya primary spare area or a pre-allocated supplementary spare area asshown in FIG. 3B, must not be used for linear replacement. Also,secondary defect list (SDL) entries for a corresponding defective blockstored in a defect management area must not be changed. The reason whythe SDL entries must not be changed is that a portion of the spare area,which is skipped and not used while the spare area is being sequentiallyused, is determined to be a defective area if the SDL entries used toprocess defects with a supplementary spare area are erased. Thus, anormal block used for linear replacement can be misdetermined as adefect, and thus, when formatting is performed later, a non-defectiveportion can be registered as a defect. Therefore, SDL entry informationwith respect to a linearly-replaced defective block within thesupplementary spare area is not changed, and the corresponding defectiveblock must not be used to linearly replace a defect within a user area.

In disc recording and/or reproducing apparatuses, information on a discis initially read by a temporary storage area such as a semiconductormemory, that is, a buffer, in order to immediately use defect managementinformation. It is prescribed in the DVD-RAM standard version 1.0 that a32 Kbyte-size buffer is used. 32 Kbytes correspond to information for 16sectors, and PDL and SDL for defect management information are stored inthe buffer in units of sectors. Thus, the minimum number of PDL entriesstored in the buffer is for one sector, and the maximum number of PDLentries stored in the buffer correspond to the maximum number of entries(i.e., 7679 entries which are for 15 sectors) that can be recorded inthe PDL. The entries of the SDL occupy an area remaining after PDLentries are stored in the 32 Kbyte buffer, and thus can manage defectentries which have a size ranging from a minimum of one sector to amaximum of 15 sectors.

Hence, the maximum allowable size of a total spare area (all of thespare areas, or in other words, a primary spare area+a supplementaryspare area) is determined by the size of a buffer and the number of PDLentries generated upon initialization of a disc. Here, since a defectcan probably be generated even in the spare area, an extra spare areafor the possible defect must be considered.

In the present invention, a 60 Kbyte buffer that can store defectinformation associated with defects having a size of 30 sectors can beused to completely process the maximum number of entries (7679 entries:for 15 sectors) that can be recorded in the PDL and the maximum numberof entries (3837 entries: for 15 sectors) that can be recorded in theSDL.

Also, if a buffer is set to have a 64 Kbyte size, the 64 Kbyte buffercan process as many defects as can be recorded in the defect managementinformation area according to the standard. In an embodiment of thepresent invention, the most preferable sizes of the spare areas that canbe allocated during initialization of a disc and during use of the discare proposed with respect to a case in which a buffer for defectmanagement is of 32 Kbytes and a case in which a buffer for defectmanagement is of 64 Kbytes.

If the size of a spare area that can be allocated is restricted so as tohave a predetermined amount of increment, a calculation expression forcalculating a required amount of spare area can be greatly simplified asdescribed later. In consideration of this merit, a spare area forslipping replacement for managing primary defects is calculated bydividing PDL entries in units of sectors. 512 PDL entries correspond toone sector, and the amount of a spare area for processing 512 PDLentries corresponds to 32 ECC blocks. One ECC block has 16 data sectors.

FIGS. 4A and 4B are tables showing the size of spare areas when the sizeof the buffer is 32 Kbytes and 64 Kbytes, respectively. The first columnin each of FIGS. 4A and 4B represents the number of PDL entries, and thesecond column therein shows the maximum number of SDL entries, that canbe processed, with respect to the number of the corresponding PDLentries. The numerals in the third column denote the minimum sizes ofspare areas, which are expressed in ECC blocks, required if a spare areafor defect management entries for linear replacement of one sector isallocated. That is, the minimum size of the spare area that can beallocated is the sum of all spare areas required to process the PDLentries with a spare area required to process the SDL entries for onesector.

The next column shows the minimum size of spare areas required toprocess all defects under a corresponding defect condition. The firstsubcolumn in the fourth column shows the minimum size of required spareareas in blocks, the second subcolumn shows the minimum size of requiredspare areas in mega bytes (MB), and the third subcolumn shows theminimum size of required spare areas as a percentage (%) of the entirecapacity. The next column shows the total number of defect entries thatcan be processed. The last column shows the maximum amount of a sparearea recommended by the present invention, that is, the amount of sparearea simplified in consideration of an appropriate amount ofsupplementary spare area to facilitate calculation of the amount of thespare area and replace defects generated in the spare area. In the lastcolumn, the first and second subcolumns show the maximum size ofrecommended spare areas in blocks and the percentage of the spare areato the total recording capacity of a disc, respectively, when theincrement between required spare areas is set to be 32 blocks, The thirdand fourth subcolumns show the maximum size of recommended spare areasin blocks and the percentage of the spare area with respect to the totalrecording capacity of a disc, respectively, when the increment betweenrequired spare areas is set to be 48 blocks,

As shown in FIG. 4A, when a 32 Kbyte buffer is used, all defects thatcan be recorded in all defect management areas cannot be completelyprocessed. As the number of primary defects (PDL entries) increases, theactual number of secondary defects that can be processed decreases, andthe percentage of the total spare area also decreases. This means thatthe state of a disc becomes worse as the number of primary defectsincreases, which reduces the number of secondary defects that can bemanaged.

To solve this problem, referring to FIG. 4B, the present inventionrecommends using a 64 Kbyte buffer. In this case, a maximum number ofsecondary defects that can be recorded in a defect management area canbe completely processed regardless of the number of primary defects.Also, the amount of total spare area can be kept relatively constantfrom about 2.7% to 3%.

The present invention describes a disc in which a primary spare area fordefect management is partially allocated upon initialization accordingto the usage purpose of the disc or the state of the disc, and asupplementary spare area is allocated after initialization when the sizeof the spare area is insufficient. Accordingly, when the supplementaryspare area must be allocated, the amount of a supplementary spare areathat can be allocated must be calculated in advance. That is, thesupplementary spare area can be easily allocated by recording the sizeof a supplementary spare area that can be allocated in a disc definitionstructure (DDS) of the defect management area (DMA), uponinitialization.

The size of a total spare area for defect management can be simplycalculated as described below. When the 64 Kbyte buffer is used, themaximum size of a total spare area that can be allocated can becalculated by the following Equation 1:${{maximum}\quad{size}\quad{of}\quad{total}\quad{spare}\quad{area}} = {{\lbrack \frac{E_{PDL}}{512} \rbrack\_ 32} + {4096\quad{blocks}}}$${{maximum}\quad{size}\quad{of}\quad{total}\quad{spare}\quad{area}} = {{4096 \cdot \lbrack \frac{E_{PDL}}{512} \rbrack}\_( {256 \cdot 32} )\quad{blocks}}$

When the 32 Kbyte buffer is used, the maximum size of a total spare areathat can be allocated can be calculated by the following Equation 2:

In Equations 1 and 2, $\lbrack \frac{E_{PDL}}{512} \rbrack$denotes a maximum integer which does not exceed${``\frac{E_{PDL}}{512}"},$E_(PDL) denotes the number of PDL entries, and 32(=INC) indicates anincrement. 4096 (=S_(MAX)) is a multiple of 2 in which the size of atotal spare area required to process the maximum number of defects isapproximated for simple calculation, when the number of primary defects(the number of PDL entries) is less than 512. Here, the size of a sparearea is shown in ECC blocks. 256 (=S_(SDL)) denotes the size of a sparearea required to process SDL entries for one sector.

A maximum total spare area recommended by FIGS. 4A and 4B is about 4%larger than that an actually-required total spare area. The size of therecommended total spare area is determined in consideration of defectsgenerated in the total spare area, and are expressed in multiples of 2,so that calculation of the size of the total spare area is simplified.

The remainder obtained by subtracting the size of a primary spare areaallocated upon initialization from the maximum size of a recommendedtotal spare area, is recorded in a DDS as the size of a supplementaryspare area that can be allocated, whereby the supplementary spare areacan be easily allocated during use of a disc.

A supplementary spare area is allocated or the size of the supplementaryspare area must be increased, in case that a primary spare areaallocated upon initialization is completely used and no other spareareas exist or the case when a supplementary spare area is completelyused. When a disc is actually used, defects are highly likely to becontinuously generated. Therefore, it is more preferable that asupplementary spare area is allocated or the size of a supplementaryspare area is increased when a small amount of spare area remains, forexample, when a certain number of blocks remain or 90% of the spare areais used, than that a supplementary spare area is allocated after theallocated spare area is completely used.

In this case, a remainder state flag representing the degree of use of aspare area is required to indicate that a predetermined amount or moreof the spare area has been used, rather than representing only twostates, in which the spare area has been completely used or the sparearea still remains, as in an existing spare area full flag. A flagindicating whether a supplementary spare area has been allocated when apredetermined amount or more of the primary spare area has been used, isalso required. In this case, a flag (which can be referred to asremainder state information for a primary spare area) representing thestate of the primary spare area has such states as shown in thefollowing Table 1, and has a structure shown in FIG. 5A. TABLE 1 flagvalue state 00b a sufficient amount of primary spare area remains 01b apredetermined amount or more of primary spare area has been used, and nosupplementary spare area is allocated 10b a predetermined amount or moreof primary spare area has been used, and a supplementary spare area hasbeen allocated 11b the primary spare area has been completely used

A flag (which can be referred to as remainder state information for asupplementary spare area) representing the state of the supplementaryspare area has states as shown in the following Table 2, and has astructure shown in FIG. 5B. TABLE 2 flag value state 00b a sufficientamount of supplementary spare area remains. 01b a predetermined amountor more of supplementary spare area has been used. 10b no correspondingstate 11b the supplementary spare area has been completely used

Here, the flag of Table 2 can indicate the necessity that the size ofthe supplementary spare area must be increased by simply representingthe state in which a predetermined amount or more of supplementary sparearea has been used. The supplementary spare area is enlarged byallocating at least a predetermined additional amount of a supplementaryspare area, and the area adjacent to the current supplementary sparearea or another area is used to perform this function. When thesupplementary spare area is enlarged by allocating a predeterminedamount or more of supplementary spare area, the value “01b” of the flagcan simply be changed to “00b.” Therefore, in contrast with theremainder state flag for a primary spare area, the remainder state flagfor a supplementary spare area has only three states.

FIG. 6 is a flowchart illustrating a method of allocating a total sparearea upon initialization, according to an embodiment of the presentinvention. Referring to FIG. 6, a defective sector detected duringcertification for checking the existence or absence of defects on a discwhile the disc is being initialized, is skipped without being suppliedwith a logical sector number, and the logical sector number which was tobe assigned to the defective sector is provided to the next sector, andthe position of the defective sector is stored in a PDL, in step S101.

Next, the required amount of the total spare area is calculated in stepS102. For example, when the number of PDL entries is between 3072 and3583, the minimum size of a total spare area is the sum of all spareareas required to process the PDL entries and a spare area required toprocess SDL entries for one sector, and thus becomes 480 ECC blocks. Ifa 32 Kbyte buffer is used, and the increment between necessary spareareas is 32 blocks, 2752 ECC blocks obtained by calculation usingEquation 2 can be allocated as the maximum size of spare area.

When the required amount of total spare area is calculated, a primaryspare area is allocated, in step S103. If the size of the primary sparearea is 512 ECC blocks, a maximum of 224 ECC blocks are used to processthe PDL entries, and the remaining blocks are used to process the SDLentries. After the primary spare area is allocated, a remainder stateflag for the primary spare area is set to an initial state “00,” in stepS104. The maximum size of a supplementary spare area is calculated bysubtracting the size of the primary spare area, allocated in step S103,from the maximum size of the total spare area calculated in step S102,in step S105. For example, the maximum size of the supplementary sparearea, 2240 ECC blocks, can be calculated by subtracting 512 ECC blocksof the allocated primary spare area from 2752 ECC blocks of the maximumspare area. Information on the size of the supplementary spare area(e.g., 2240 ECC blocks) and information on the remainder state of thesupplementary spare area, are recorded at predetermined positions in aDDS or DMA area, and initialization is concluded, in step S106.

FIG. 7 is a flowchart illustrating a method of allocating asupplementary spare area using information on the remainder state of aprimary spare area, according to an embodiment of the present invention.A determination is made as to whether a remainder state flag for theprimary spare area set during initialization is in a state “01” in whichthe primary spare area has been almost used and a supplementary sparearea has been allocated, in step S201. If the answer to the step S201 isNO, another determination is made as to whether a supplementary sparearea is to be allocated, in step S202. If it is determined in step S202that allocation of a supplementary spare area is required, the size ofthe supplementary spare area is checked, in step S203. That is, themaximum size of a supplementary spare area that can be allocated, andthe maximum size of a supplementary spare area that must be allocated,are checked. The size of the supplementary spare area that must beallocated, can be set by a user, or can be a preset predeterminedincrement.

The existence of a sufficient amount of continuous empty space at therear of a logical file area is checked, in step S204. It is determinedwhether enough empty space exists, in step S205. If enough empty spaceexists at the rear of the logical file area, a supplementary spare areafor linear replacement, of a predetermined size, is allocated startingfrom the rearmost portion of the logical file area, in step S206.Management information for the supplementary spare area, that is, aremainder state flag for the supplementary spare area, is initializedback to “00”, and the information on the size of the supplementary sparearea is updated, in step S207. Then, the process is concluded. When anarea that has already been linearly replaced is allocated as thesupplementary spare area for linear replacement in step S206, adefective block within the supplementary spare area is not used forlinear replacement, and the SDL entries must be kept without change, asdescribed above referring to FIG. 3.

If a sufficient amount of continuous empty area does not exist at therear portion of the logical file area in step S205, empty areas arerearranged in step S208. Preferably, this is done by physically movingthe empty areas. Then, a determination is made as to whether asufficient amount of continuous empty area exists, in step S209. Ifthere is a sufficient amount of continuous empty area, the step S206 forallocating a supplementary spare area is again performed. If the amountof continuous empty area is insufficient even after the rearrangement ofthe empty areas, a message “a supplementary spare area cannot beallocated” is displayed, in step S210. Then, the process is concluded.

FIG. 8 is a flowchart illustrating a method of allocating anothersupplementary spare area using information on the remainder state of aninitial supplementary spare area, according to an embodiment of thepresent invention. A determination is made as to whether a remainderstate flag for the initial supplementary spare area for replacingsecondary defects generated during use of a disc is in a state “01” inwhich the initial supplementary spare area has been almost used, in stepS301. If most of the initial supplementary spare area has been used,another determination is made as to whether another supplementary sparearea is to be allocated, in step S302. If it is determined in step S302that allocation of another supplementary spare area is required, thesize of the another supplementary spare area is checked, in step S303.That is, the maximum size of a supplementary spare area that can beallocated, and the size of the another supplementary spare area thatmust be allocated, are checked. The maximum size of a supplementaryspare area is determined by subtracting the size of a spare areaallocated upon initialization from the maximum size of the total sparearea. The size of the supplementary spare area that must be allocatedcan be set by a user or can be a preset predetermined increment.

The existence of a sufficient amount of continuous empty space at therear of a logical file area is checked, in step S304. Then, it isdetermined whether the empty space exists, in step S305. If enough emptyspace exists at the rear of the logical file area, another supplementaryspare area for linear replacement, of a predetermined size, is allocatedstarting from the rearmost portion of the logical file area, in stepS306. When an area that has already been linearly replaced is allocatedas the supplementary spare area for linear replacement in step S306, adefective block within the supplementary spare area is not used forlinear replacement, and the SDL entries must be kept without change, asdescribed above referring to FIG. 3.

After the step S306, management information for the anothersupplementary spare area, that is, a remainder state flag for theanother supplementary spare area, is initialized back to “00”, and thesize of the allocated another supplementary spare area is updated, instep S307. Then, the process is concluded.

If a sufficient amount of continuous empty area does not exist at therear portion of the logical file area in step S305, empty areas arerearranged in step S308. Then, a determination is made as to whether asufficient amount of continuous empty area exists, in step S309. Ifthere is a sufficient amount of continuous empty area, the step S306 forallocating the another supplementary spare area is again performed. Ifthe amount of continuous empty area is insufficient even after therearrangement of the empty areas, a message “a supplementary spare areacannot be allocated” is displayed, in step S310. Then, the process isconcluded.

As described above, in the present invention, information on the sizesof a primary spare area and a supplementary spare area can be calculatedby a simple numerical expression, and information on the remainderstates of spare areas is stored and managed, so that the spare areas canbe more flexibly and effectively allocated and managed.

Also, in the present invention, defective blocks within thesupplementary spare area are not used for linear replacement, and SDLentries are not changed, so that malfunction is prevented.

Although a few preferred embodiments of the present invention have beenshown and described, it would be appreciated by those skilled in the artthat changes may be made in this embodiment without departing from theprinciples and spirit of the invention, the scope of which is defined inthe claims and their equivalents.

1. A defect management method for recording and/or reproducing data withrespect to a storage medium, the storage medium including a data areafor storing user data and a spare area for defect management of the userdata and which is allocated upon initialization of the storage medium,the defect management method comprising: allocating a primary spare areaupon initialization of the recording medium; and allocating and/orexpanding a supplementary spare area, after the initialization of therecording medium, in a forward direction starting from a rear portion ofthe data area of the storage medium, for defect management of the userdata.
 2. The defect management method of claim 1, wherein defectivesectors in the supplementary spare area and corresponding replacementsectors which have already been registered in an SDL (Secondary DefectList), are not be used as spare sectors.
 3. The defect management methodof claim 1, further comprising either a defect management area or a discdefinition structure area in which remainder state information for theprimary and supplementary spare areas are stored.
 4. The defectmanagement method of claim 1, wherein a size of the primary spare areais based on the number of defects generated upon initialization of saidrecording medium.
 5. The defect management method of claim 1, whereinthe supplementary spare area is allocated a plurality of times afterinitialization of said recording medium.